package com.liu.InterfaceAnnotation;


import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;

@Aspect
public class AnnotationCut {


    @Pointcut("execution(* com.liu.InterfaceAnnotation.Person.*(..))")
    public void myPointCut(){}

    @Before("myPointCut()")
    public void BeforeMenthod(JoinPoint joinPoint){
        System.out.println(joinPoint.getSignature().getName() + "--------- Before------");
    }

    @After("myPointCut()")//在myPointCut()中查到的方法之后切入
    public void afterTest(){
        System.out.println(" after...");
    }
}
